﻿
Namespace LightSwitchApplication

    Public Class AssetInformation

        Private Sub checker_Compute(ByRef result As Boolean)
            ' Set result to the desired field value
            Dim isCheckedOut = From cOut In RentalCheckouts
                               Where cOut.AssetInformation.Id = Id And
                               (Not cOut.DateOut = Nothing And cOut.DateIn Is Nothing)
            If isCheckedOut.Count > 0 Then
                result = True
            Else
                result = False
            End If
        End Sub
    End Class

End Namespace
